<template>
  <div class="shop-info">
        <div class="shop-top">
             <img :src="shop.logo" alt="">
             <span class="tit">{{shop.name}}</span>
        </div>
        <div class="shop-middle">
            <div class="shop-middle-item shop-middle-left">
              <div class="info-sells">
                  <p>{{shop.sells}}</p>
                  <div class="sells-text">总销量</div>
              </div>
              <div class="info-goods">
                  <div class="goods-count">
                      {{shop.goodsCount}}
                  </div>
                  <div class="goods text">全部宝贝</div>
                </div>
            </div>
            <div class="shop-middle-item shop-middle-right">
              <table>
                <tr v-for="(item,index) in shop.score" :key="index">
                  <td>{{item.name}}</td>
                  <td class="score" :class="{'score-better':item.isBetter}">{{item.score}}</td>
                  <td class="better" :class="{'better-more':item.isBetter}">{{item.isBetter? '高':'低'}}</td>
                </tr>
              </table>
            </div>
        </div> 
  </div>
</template>
<script>
export default {
  name: 'Detailinfo',
  components: {},
  directives: {},
  props:{
    shop:{
      type:Object,
      default(){
         return {}
      }
    }
  },
  data() {
    return {
      
    };
  },
  mounted() {
    
  },
  methods: {
    
  },
};
</script>
<style  scoped>
.shop-info{
  background: rgba(98, 91, 91,0.4);
  padding:5px 0;
}
  .shop-top{
    text-align:left;
    font-size: 0;
    padding:0 10px;
  }
 .shop-top img{
   display: inline-block;
   vertical-align: top;
   width:50px;
   height:50px;
   overflow: hidden;
   border-radius: 50%;
 }
 .shop-top .tit{
   display: inline-block;
   vertical-align: top;
   font-size:20px;
   color: #220b1a;
   line-height: 50px;
   margin:0 20px;
 }
 .shop-middle{
   display: flex;
   justify-content: space-between;
   padding:0 10px;
   margin:10px auto;
 }
 .shop-middle-left{
   display: flex;
   justify-content: space-between;
 }
 .shop-middle-right{
    display: flex;
   justify-content: left;
 }
  .shop-middle-right table{
    width:100%;
  }
   .shop-middle-right table td{
      font-size: 16px;
      color: #000;
      text-align: center;
      padding:5px 0;
      vertical-align: middle;
   }
 .info-sells{
   flex: 1;
   font-size:18px;
   color: darkgoldenrod;
   line-height: 22px;
 }
 .sells-text{
    font-size:15px;
    text-align: center;
    color: darkgoldenrod;
     line-height: 22px;
 }
 .info-goods{
    flex: 2;
    margin:0 10px;
    text-align: center;
    font-size: 16px;
 }
  .shop-middle-right table td.score,   .shop-middle-right table td.better{
   color:green;
 }
.shop-middle-right table td.score-better{
   color:red;
 }
.shop-middle-right table td.better-more{
   color: red;
 }

</style>